package com.ruoyi.materialCuttingPlan.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 门窗用料计算公式对象 mcp_formulas
 * 
 * @author ruoyi
 * @date 2025-07-15
 */
public class McpFormulas extends McpBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 所属公司ID */
    @Excel(name = "所属公司ID")
    @NotNull(message = "所属公司不能为空")
    private Long companyId;

    /** 所属公司ID */
    @Excel(name = "所属公司名称")
    private String companyName;

    /** 型材id */
    @Excel(name = "型材id")
    private Long materialId;
    /** 型材id */
    @Excel(name = "型材")
    private String materialName;

    /** 每米重量 */
    @Excel(name = "每米重量")
    private BigDecimal materialWeightPerMeter;

    /** 所属门窗类型ID */
    @Excel(name = "所属门窗类型ID")
    @NotNull(message = "所属门窗类型不能为空")
    private Long typeId;

    /** 所属公司ID */
    @Excel(name = "所属门窗类型名称")
    private String typeName;

    /** 公式名称 */
    @Excel(name = "公式名称")
    private String formulaName;

    /** 公式内容(计算表达式) */
    @Excel(name = "公式内容(计算表达式)")
    @NotBlank(message = "公式内容不能为空")
    private String formulaContent;

    /** 材料数量 */
    @Excel(name = "材料数量")
    @NotNull(message = "材料数量不能为空")
    @Max(value = 999999, message = "材料数量不能大于999999")
    @Min(value = 0, message = "材料数量不能小于0")
    private Long materialCount;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public Long getMaterialId() {
        return materialId;
    }

    public void setMaterialId(Long materialId) {
        this.materialId = materialId;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public BigDecimal getMaterialWeightPerMeter() {
        return materialWeightPerMeter;
    }

    public void setMaterialWeightPerMeter(BigDecimal materialWeightPerMeter) {
        this.materialWeightPerMeter = materialWeightPerMeter;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public void setTypeId(Long typeId)
    {
        this.typeId = typeId;
    }

    public Long getTypeId() 
    {
        return typeId;
    }

    public void setFormulaName(String formulaName) 
    {
        this.formulaName = formulaName;
    }

    public String getFormulaName() 
    {
        return formulaName;
    }

    public void setFormulaContent(String formulaContent)
    {
        this.formulaContent = formulaContent;
    }

    public String getFormulaContent()
    {
        return formulaContent;
    }

    public Long getMaterialCount() {
        return materialCount;
    }

    public void setMaterialCount(Long materialCount) {
        this.materialCount = materialCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("typeId", getTypeId())
            .append("formulaName", getFormulaName())
            .append("formulaContent", getFormulaContent())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
